package org.yuangu.privacyfinance.activities.viewmodel;

import android.app.Application;

import com.privacy.accountmgr.R;

import org.yuangu.privacyfinance.domain.FinanceDatabase;
import org.yuangu.privacyfinance.domain.model.RepeatingTransaction;

import java.util.List;

import androidx.annotation.NonNull;
import androidx.lifecycle.LiveData;

public class RepeatingTransactionsViewModel extends BaseViewModel {
    private LiveData<List<RepeatingTransaction>> repeatingTransactions;

    public RepeatingTransactionsViewModel(@NonNull Application application) {
        super(application);
        setNavigationDrawerId(R.id.nav_repeating_transactions);
        setTitle(R.string.activity_repeating_transactions_title);
        repeatingTransactions = FinanceDatabase.getInstance()
                .repeatingTransactionDao().getAll();
    }

    public LiveData<List<RepeatingTransaction>> getRepeatingTransactions() {
        return repeatingTransactions;
    }
}
